#include <stdio.h>
#include <stdlib.h>
#include <string.h>

struct Student // 结构体名：Student
{
    int id;              // 学号
    char Name[16];       // 姓名
};
typedef struct Student Stu;

int main()
{
    //和普通的申请一样
    Stu *s = (Stu *)malloc(sizeof(Stu));
    if(s == NULL)
    {
        return -1;
    }
    s->id = 10;
    strcpy(s->Name,"zhangsan");
    printf("%d %s\n",s->id,s->Name);
    free(s);

    //结构体数组
    Stu *s = (Stu *)malloc(sizeof(Stu)*10);   //直接*数组数量
    return 0;
}
